#include <iostream>
using namespace std;

class User {
public:
	User (const string& name, int age):m_name(name),m_age(age) {}
	/*
	   void print (User *this) {}
	 */
	void print (void) {
		cout << m_name << ',' << m_age << endl;
		//在成员函数中访问类中的其他成员可以通过this指针进行访问
		//this指针可以省略不写,也可以显式的写出来
		cout << this->m_name << ',' << this->m_age << endl;
	}
private:
	string m_name;
	int m_age;
};

int main (void)
{
	User u1("张杰", 40);
	User u2("谢娜", 40);
	u1.print();
	u2.print();
	return 0;
}
